<html>
<head>
<title>API Documentation</title>
<style>
body {
	font: 13px Verdana, Helvetica, sans-serif;
	color: #333;
	background: #eee;
}
h1, h2, h3, h4 {
	margin: 0px;
	padding: 0px;
}
.method {
	margin-top: 20px;
}
.author, .version, .param, .return, .see, .since {
	padding-left: 1em;
}
:target {
	background: #ffd;
}
li {
	padding-left: 2em;
}
.summary {
	font-style: oblique;
}
.method {
	color: #521;
	text-decoration: underline;
}
.param {
	color: #44b;
}
.return {
	color: #4a4;
}
.since {
	color: #777;
}
</style>
</head>
<body>

<h2 class="title">LibExtraTip</h2><br/>
LibExtraTip is a library of API functions for manipulating additional information into GameTooltips by either adding information to the bottom of existing tooltips (embedded mode) or by adding information to an extra "attached" tooltip construct which is placed to the bottom of the existing tooltip.<br/>
Copyright (C) 2008, by the respecive below authors.<br/>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.<br/>
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.<br/>
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA<br/>
 <br/>
<b class="author">Author: Matt Richard (Tem)</b><br/>
<b class="author">Author: Ken Allan &lt;ken@norganna.org></b><br/>
<b class="version">Version: 1.0</b><br/>

<h3 class="method" id="RegisterTooltip">Class Method LibExtraTip:RegisterTooltip(tooltip)</h3><br/>
<h4 class="summary">Adds the provided tooltip to the list of tooltips to monitor for items.</h4><br/>
<b class="param">tooltip</b>: GameTooltip object<br/>
<b class="return">Returns</b>: true if tooltip is registered<br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="IsRegistered">Class Method LibExtraTip:IsRegistered(tooltip)</h3><br/>
<h4 class="summary">Checks to see if the tooltip has been registered with LibExtraTip</h4><br/>
<b class="param">tooltip</b>: GameTooltip object<br/>
<b class="return">Returns</b>: true if tooltip is registered<br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="AddCallback">Class Method LibExtraTip:AddCallback(callback, priority)</h3><br/>
<h4 class="summary">Adds a callback to be informed of any registered tooltip's activity.</h4><br/>
Callbacks are passed the following parameters (in order):
<li>tooltip: The tooltip object being shown (GameTooltip object)</li>
<li>item: The item being shown (in <a href="http://wowwiki.com/ItemLink" target="_blank">ItemLink</a> format)</li>
<li>quantity: The quantity of the item being shown (may be nil when the quantity is unavailable)</li>
<li>return values from <a href="http://wowwiki.com/API_GetItemInfo" target="_blank">GetItemInfo</a> (in order)</li><br/>
<b class="param">callback</b>: the method to be called<br/>
<b class="param">priority</b>: the priority of the callback (optional, default 200)<br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="RemoveCallback">Class Method LibExtraTip:RemoveCallback(callback)</h3><br/>
<h4 class="summary">Removes the given callback from the list of callbacks.</h4><br/>
<b class="param">callback</b>: the callback to remove from notifications<br/>
<b class="return">Returns</b>: true if successfully removed<br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="SetEmbedMode">Class Method LibExtraTip:SetEmbedMode(flag)</h3><br/>
<h4 class="summary">Sets the default embed mode of the library (default false)</h4><br/>
A false embedMode causes AddLine, AddDoubleLine and AddMoneyLine to add lines to the attached tooltip rather than embed added lines directly in the item tooltip.
This setting only takes effect when embed mode is not specified on individual AddLine, AddDoubleLine and AddMoneyLine commands.<br/>
 <br/>
<b class="param">flag</b>: boolean flag if true embeds by default<br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="AddLine">Class Method LibExtraTip:AddLine(tooltip, text, r, g, b, embed)</h3><br/>
<h4 class="summary">Adds a line to a registered tooltip.</h4><br/>
<b class="param">tooltip</b>: GameTooltip object<br/>
<b class="param">text</b>: the contents of the tooltip line<br/>
<b class="param">r</b>: red component of the tooltip line color (optional)<br/>
<b class="param">g</b>: green component of the tooltip line color (optional)<br/>
<b class="param">b</b>: blue component of the tooltip line color (optional)<br/>
<b class="param">embed</b>: override the lib's embedMode setting (optional)<br/>
<b class="see">See also</b>: <a href="#SetEmbedMode">SetEmbedMode</a><br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="AddDoubleLine">Class Method LibExtraTip:AddDoubleLine(tooltip, textLeft, textRight, lr, lg, lb, rr, rg, rb, embed)</h3><br/>
<h4 class="summary">Adds a two-columned line to the tooltip.</h4><br/>
<b class="param">tooltip</b>: GameTooltip object<br/>
<b class="param">textLeft</b>: the left column's contents<br/>
<b class="param">textRight</b>: the left column's contents<br/>
<b class="param">r</b>: red component of the tooltip line color (optional)<br/>
<b class="param">g</b>: green component of the tooltip line color (optional)<br/>
<b class="param">b</b>: blue component of the tooltip line color (optional)<br/>
<b class="param">embed</b>: override the lib's embedMode setting (optional)<br/>
<b class="see">See also</b>: <a href="#SetEmbedMode">SetEmbedMode</a><br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="GetMoneyText">Class Method LibExtraTip:GetMoneyText(money, concise)</h3><br/>
<h4 class="summary">Creates a string representation of the money value passed using embedded textures for the icons</h4><br/>
<b class="param">money</b>: the money value to be converted in copper<br/>
<b class="param">concise</b>: when false (default), the representation of 1g is "1g 00s 00c" when true, it is simply "1g" (optional)<br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="AddMoneyLine">Class Method LibExtraTip:AddMoneyLine(tooltip, text, money, r, g, b, embed)</h3><br/>
<h4 class="summary">Adds a line with text in the left column and a money frame in the right.</h4><br/>
The money parameter is given in copper coins (i.e. 1g 27s 5c would be 12705)<br/>
 <br/>
<b class="param">tooltip</b>: GameTooltip object<br/>
<b class="param">text</b>: the contents of the tooltip line<br/>
<b class="param">money</b>: the money value to be displayed (in copper)<br/>
<b class="param">r</b>: red component of the tooltip line color (optional)<br/>
<b class="param">g</b>: green component of the tooltip line color (optional)<br/>
<b class="param">b</b>: blue component of the tooltip line color (optional)<br/>
<b class="param">embed</b>: override the lib's embedMode setting (optional)<br/>
<b class="see">See also</b>: <a href="#SetEmbedMode">SetEmbedMode</a><br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="CallTooltipMethod">Class Method LibExtraTip:CallTooltipMethod(tooltip, method, args, detail)</h3><br/>
<h4 class="summary">Calls a tooltip's method, passing arguments and setting additional details.</h4><br/>
You must use this function when you are setting your own tooltip, but want LibExtraTip to display the extra tooltip information and notify any callbacks.<br/>
 <br/>
<b class="param">tooltip</b>: GameTooltip object<br/>
<b class="param">method</b>: the tooltip method to call (or nil to not call any)<br/>
<b class="param">args</b>: table of arguments to pass to tooltip method<br/>
<b class="param">detail</b>: additional detail items to set for the callbacks<br/>
<b class="return">Returns</b>: whatever the called method returns<br/>
<b class="since">Available since v1.0</b><br/>

<h3 class="method" id="GetTooltipAdditional">Class Method LibExtraTip:GetTooltipAdditional(tooltip)</h3><br/>
<h4 class="summary">Get the additional information from a tooltip event.</h4><br/>
Often additional event details are available about the situation under which the tooltip was invoked, such as:
<li>The call that triggered the tooltip.</li>
<li>The slot/inventory/index of the item in question.</li>
<li>Whether the item is usable or not.</li>
<li>Auction price information.</li>
<li>Ownership information.</li>
<li>Any data provided by the Get*Info() functions.</li>
If you require access to this information for the current tooltip, call this function to retrieve it.<br/>
 <br/>
<b class="param">tooltip</b>: GameTooltip object<br/>
<b class="return">Returns</b>: table containing the additional information<br/>
<b class="since">Available since v1.0</b><br/>

</body>
</html>